﻿using System;
using System.Runtime.InteropServices;

namespace MzkMusic
{
    internal class Interface
    {
        [StructLayout(LayoutKind.Sequential, Pack = 4)]
        public struct SongInfo
        {
            //[MarshalAs(UnmanagedType.ByValArray, SizeConst = GlobalData.NAME_SIZE)]
            //public char[] Author;
            //[MarshalAs(UnmanagedType.ByValArray, SizeConst = GlobalData.NAME_SIZE)]
            //public char[] Name;
            //[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
            //public char[] Time
            public string Author; // 作者
            public string Path; // 歌曲路径
            public string Name; // 歌曲名称
            public string Time; // 歌曲时间
            public string lyrics; // 歌词
            public bool Favorite; // 是否喜爱
            public double CurTime;// 当前播放时间

            public SongInfo(string author, string Path, string songName, string songTime, string lyrics, bool Favorite, double CurTime)
            {
                // 初始化数组
                this.Author = author;
                this.Path = Path;
                this.Name = songName;
                this.Time = songTime;
                this.lyrics = lyrics;
                this.Favorite = Favorite;
                this.CurTime = CurTime;
            }
        }
    }
}